package com.maddox.relax.model;

import android.net.Uri;
import android.provider.MediaStore;

/**
 * 一些查询手机媒体库需要的字段
 */
public class MediaStoreConstants {

    public static final String _ID = MediaStore.Files.FileColumns._ID;
    public    static final String MIME_TYPE = MediaStore.MediaColumns.MIME_TYPE;
    public    static final String MEDIA_TYPE = MediaStore.Files.FileColumns.MEDIA_TYPE;
    public    static final String DISPLAY_NAME = MediaStore.Files.FileColumns.DISPLAY_NAME;
    public   static final int MEDIA_TYPE_VIDEO = MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO;
    public   static final int MEDIA_TYPE_IMAGE = MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE;
    public static final String WIDTH = MediaStore.Files.FileColumns.WIDTH;
    public  static final String HEIGHT = MediaStore.Files.FileColumns.HEIGHT;
    public static final String DATE_MODIFIED = MediaStore.Files.FileColumns.DATE_MODIFIED;
    public  static final String DURATION = MediaStore.MediaColumns.DURATION;
    public static final String SIZE = MediaStore.MediaColumns.SIZE;
    public static final String COLUMN_BUCKET_ID = "bucket_id";
    public  static final String COLUMN_BUCKET_DISPLAY_NAME = "bucket_display_name";
    public  static final String COLUMN_URI = "uri";
    public  static final String COLUMN_COUNT = "count";
    public  static final String BUCKET_ORDER_BY = MediaStore.MediaColumns.DATE_MODIFIED + " DESC";

    public static final String DATA = MediaStore.MediaColumns.DATA;
    public static final Uri QUERY_URI = MediaStore.Files.getContentUri("external");

    public  static boolean isBeforeAndroidQ() {
        return android.os.Build.VERSION.SDK_INT < 29;
    }

}
